﻿using System;

namespace TrivialPurfuit.Data
{
    /// <summary>
    /// Constancts for the catagory table arranged into a Java style enum.
    /// This really just for the benifit for keeping track of the Catagory null
    /// id and name.
    /// </summary>
    public class CategoryCON
    {
        /// <summary>
        /// The initial value when an Account is made.
        /// </summary>
        public static CategoryCON NULL = new CategoryCON(-1, "");

        /// <summary>
        /// The id of the catagory
        /// </summary>
        public int ID
        {
            get;
            private set;
        }

        /// <summary>
        /// The name of the catagory.
        /// </summary>
        public string Name
        {
            get;
            private set;
        }

        /// <summary>
        /// Prints the name of the catagory.
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return this.Name;
        }

        /// <summary>
        /// Prevents outside instantiation of this class. USe this to make more
        /// static instances.
        /// </summary>
        /// <param name="id">The id of the catagory.</param>
        /// <param name="name">The name of the catagory.</param>
        private CategoryCON(Int32 id, string name)
        {
            this.ID = id;
            this.Name = name;
        }
    }
}
